<?php
include ('top.ajax.php');


$delivery=new Delivery();
$delivery['cout']=$_POST['cout'];
$delivery['vendor_id']=$_POST['vendor_id'];
$delivery['pays_id']=$_POST['indexpays'];
$delivery['delai']=$_POST['delai'];
if ($_POST['indexlservice']==1) {
$delivery['service']="Colissimo";
$delivery['delivery_id']=1;
}
elseif ($_POST['indexlservice']==2) {
$delivery['service']="Chronopost";
$delivery['delivery_id']=2;
}
else {
$delivery['service']=$_POST['service'];
$delivery['delivery_id']=-1;
}

$delivery->save();







?>